import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/home.vue'),
      redirect: '/dataGlance',
      children: [
        {
          path: '/dataGlance',
          name: '数据概览',
          component: () => import('../views/DataGlance/dataGlance.vue'),
        },
        {
          path: '/candidateManagement',
          name: '候选人管理',
          component: () => import('../views/CandidateManagement/candidateManagement.vue'),
        },
        {
          path: '/topicManagement',
          name: '题目分类管理',
          component: () => import('../views/QuestionManagement/topicManagement.vue'),
        },
        {
          path: '/topicSet',
          name: '题目集管理',
          component: () => import('../views/QuestionManagement/topicSet.vue'),
        },
        {
          path: '/topicClassification',
          name: '题目管理',
          component: () => import('../views/QuestionManagement/topicClassification.vue'),
        },
        {
          path: '/InterviewTranscripts',
          name: '面试记录',
          component: () => import('../views/Transcripts/InterviewTranscripts.vue'),
        },
        {
          path: '/posts',
          name: '职位管理',
          component: () => import('../views/Posts/posts.vue'),
        },
        {
          path: '/Interviewer',
          name: '面试官管理',
          component: () => import('../views/Interviewer/Interviewer.vue'),
        },
        {
          path: '/systemSettings',
          name: '系统设置',
          component: () => import('../views/SystemSettings/systemSettings.vue'),
        },
      ]
    },

  ],
})

export default router
